let http = require('http');
let server = http.createServer((request, response) => {
  console.log('前端的亲求来了')
  response.end('6666')
})

let port = 8080;
server.listen(port, () => {
  console.log(port + "端口已被启动")

})
server.on('error', err => {
  if (err.code == 'EADDRINUSE') {
    server.listen(++port, () => {
      console.log(port + "端口已被启动")

    })
  }
})